<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>分类管理</title>
</head>
<body>
<div th:fragment="content">
    <div class="layui-card">
        <div class="layui-card-header">分类管理</div>
        <div class="layui-card-body">
            <!-- 查询和添加分类表单 -->
            <div class="layui-row mb-4">
                <div class="layui-col-md6">
                    <div class="layui-input-inline">
                        <input type="text" id="search-category-name" placeholder="查询分类名称" class="layui-input">
                    </div>
                    <button class="layui-btn" id="search-category">
                        <i class="fa fa-search"></i> 查询
                    </button>
                </div>
                <div class="layui-col-md6">
                    <button class="layui-btn" id="add-category">
                        <i class="fa fa-plus"></i> 添加分类
                    </button>
                </div>
            </div>

            <!-- 分类表格 -->
            <table class="layui-table"true, id="categoryTable" lay-filter="categoryTable">
            </table>
        </div>
    </div>
    <script type="text/html" id="addCategoryDialog">
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">分类名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" placeholder="请输入分类名称" class="layui-input" required>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">优先级</label>
                <div class="layui-input-block">
                    <input type="number" name="priority" placeholder="请输入优先级" class="layui-input" required>
                </div>
            </div>
        </form>
    </script>


    <!-- 行内工具条 -->
    <script type="text/html" id="categoryBar">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    </script>
</div>
</body>
</html>